package cn.kmsoft.common;

import java.io.File;
import java.io.FilenameFilter;

public class FileFilter implements FilenameFilter {
    private String type;

    public FileFilter(String type) {
        this.type = type.toLowerCase();
    }

    @Override
    public boolean accept(File dir, String name) {

        return name.toLowerCase().endsWith("." + this.type);
    }
}
